// import { getEnvValue, getPkgVersion, isDevMode } from '@/easy-util-ts/env';
import { getEnvValue, getPkgVersion, isDevMode } from '@easyproduce/easy-util-ts/env';
import pkg from '../../package.json';
export function getPkgVersion() {
	return `${`__${pkg.version}`}__`.toUpperCase();
}
// default cache time, in seconds
export const DEFAULT_CACHE_TIME = 60 * 60 * 24 * 7;
const PREFIX =
  getEnvValue<string>('VITE_APP_CACHE_PREFIX') || getEnvValue<string>('VITE_APP_TITLE') || 'ASA_UNI';
export const DEFAULT_PREFIX_KEY = `${PREFIX}${getPkgVersion()}`;

// aes encryption key
export const cacheCipher = {
  key: 'HbpKN5WmETFl/+2g',
  iv: 't/ibdLUnOT4qRs15',
};

// Whether the system cache is encrypted using aes
export const enableStorageEncryption = !isDevMode();
